package com.jyx.manage_cms.web.controller;

import com.jyx.api.course.SysDictionaryControllerApi;
import com.jyx.framework.domain.system.SysDictionary;

import com.jyx.manage_cms.service.SysDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys/dictionary")
public class SysDictionaryController implements SysDictionaryControllerApi {
    @Autowired
    SysDictionaryService sysDictionaryService;

    @Override
    @GetMapping("/get/{dType}")
    public SysDictionary getByType(@PathVariable String dType) {
        return sysDictionaryService.getDicByType(dType);
    }
}
